package com.kczd.jinlan.model;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * yang_g
 * 用户
 * Created by Administrator on 2017/5/24.
 */

public class User {
    public String user_id;
    public String username;//姓名
    public String password;
    public String paypwd;
    public String sex;
    public String user_money;
    public String frozen_money;
    public String distribut_money;
    public String pay_points;
    public String address_id;
    public String reg_time;
    public String last_login;
    public String last_ip;
    public String qq;
    public String mobile_validated;
    public String oauth;
    public String openid;
    public String unionid;
    public String head_pic;
    public String sign;
    public String province;
    public String city;
    public String district;
    public String town;
    public String address;
    public String nickname;
    public String discount;
    public String total_amount;
    public String is_lock;
    public String is_shop;
    public String token;
    public String latitude;
    public String longitude;
    public String mobile;//联系电话


    public void JsonTobject(JSONObject json) throws JSONException {
        JSONObject data=json.getJSONObject("data");
        this.setUser_id(data.getString("user_id"));
        this.setUsername(data.getString("username"));
        this.setPassword(data.getString("password"));
        this.setPaypwd(data.getString("paypwd"));
        this.setSex(data.getString("sex"));
        this.setUser_money(data.getString("user_money"));
        this.setFrozen_money(data.getString("frozen_money"));
        this.setDistribut_money(data.getString("distribut_money"));
        this.setPay_points(data.getString("pay_points"));
        this.setAddress_id(data.getString("address_id"));
        this.setReg_time(data.getString("reg_time"));
        this.setLast_login(data.getString("last_login"));
        this.setLast_ip(data.getString("last_ip"));
        this.setQq(data.getString("qq"));
        this.setMobile(data.getString("mobile"));
        this.setMobile_validated(data.getString("mobile_validated"));
        this.setOauth(data.getString("oauth"));
        this.setOpenid(data.getString("openid"));
        this.setUnionid(data.getString("unionid"));
        this.setHead_pic(data.getString("head_pic"));
        this.setSign(data.getString("self_sign"));
        this.setProvince(data.getString("province"));
        this.setCity(data.getString("city"));
        this.setDistrict(data.getString("district"));
        this.setTown(data.getString("town"));
        this.setAddress(data.getString("address"));
        this.setNickname(data.getString("nickname"));
        this.setDiscount(data.getString("discount"));
        this.setTotal_amount(data.getString("total_amount"));
        this.setIs_lock(data.getString("is_lock"));
        this.setIs_shop(data.getString("is_shop"));
        this.setToken(data.getString("token"));
        this.setLongitude(data.getString("longitude"));
        this.setLatitude(data.getString("latitude"));
    }

    public User(){

    }

    public User(String user_id, String username, String password, String paypwd, String sex, String user_money, String frozen_money, String distribut_money, String pay_points, String address_id, String reg_time, String last_login, String last_ip, String qq, String mobile_validated, String oauth, String openid, String unionid, String head_pic, String sign, String province, String city, String district, String town, String address, String nickname, String discount, String total_amount, String is_lock, String is_shop, String token, String latitude, String longitude, String mobile) {
        this.user_id = user_id;
        this.username = username;
        this.password = password;
        this.paypwd = paypwd;
        this.sex = sex;
        this.user_money = user_money;
        this.frozen_money = frozen_money;
        this.distribut_money = distribut_money;
        this.pay_points = pay_points;
        this.address_id = address_id;
        this.reg_time = reg_time;
        this.last_login = last_login;
        this.last_ip = last_ip;
        this.qq = qq;
        this.mobile_validated = mobile_validated;
        this.oauth = oauth;
        this.openid = openid;
        this.unionid = unionid;
        this.head_pic = head_pic;
        this.sign = sign;
        this.province = province;
        this.city = city;
        this.district = district;
        this.town = town;
        this.address = address;
        this.nickname = nickname;
        this.discount = discount;
        this.total_amount = total_amount;
        this.is_lock = is_lock;
        this.is_shop = is_shop;
        this.token = token;
        this.latitude = latitude;
        this.longitude = longitude;
        this.mobile = mobile;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getUser_id() {
        return user_id;
    }

    public void setUser_id(String user_id) {
        this.user_id = user_id;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPaypwd() {
        return paypwd;
    }

    public void setPaypwd(String paypwd) {
        this.paypwd = paypwd;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getUser_money() {
        return user_money;
    }

    public void setUser_money(String user_money) {
        this.user_money = user_money;
    }

    public String getFrozen_money() {
        return frozen_money;
    }

    public void setFrozen_money(String frozen_money) {
        this.frozen_money = frozen_money;
    }

    public String getDistribut_money() {
        return distribut_money;
    }

    public void setDistribut_money(String distribut_money) {
        this.distribut_money = distribut_money;
    }

    public String getPay_points() {
        return pay_points;
    }

    public void setPay_points(String pay_points) {
        this.pay_points = pay_points;
    }

    public String getAddress_id() {
        return address_id;
    }

    public void setAddress_id(String address_id) {
        this.address_id = address_id;
    }

    public String getReg_time() {
        return reg_time;
    }

    public void setReg_time(String reg_time) {
        this.reg_time = reg_time;
    }

    public String getLast_login() {
        return last_login;
    }

    public void setLast_login(String last_login) {
        this.last_login = last_login;
    }

    public String getLast_ip() {
        return last_ip;
    }

    public void setLast_ip(String last_ip) {
        this.last_ip = last_ip;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public String getMobile_validated() {
        return mobile_validated;
    }

    public void setMobile_validated(String mobile_validated) {
        this.mobile_validated = mobile_validated;
    }

    public String getOauth() {
        return oauth;
    }

    public void setOauth(String oauth) {
        this.oauth = oauth;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getUnionid() {
        return unionid;
    }

    public void setUnionid(String unionid) {
        this.unionid = unionid;
    }

    public String getHead_pic() {
        return head_pic;
    }

    public void setHead_pic(String head_pic) {
        this.head_pic = head_pic;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getDistrict() {
        return district;
    }

    public void setDistrict(String district) {
        this.district = district;
    }

    public String getTown() {
        return town;
    }

    public void setTown(String town) {
        this.town = town;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getDiscount() {
        return discount;
    }

    public void setDiscount(String discount) {
        this.discount = discount;
    }

    public String getTotal_amount() {
        return total_amount;
    }

    public void setTotal_amount(String total_amount) {
        this.total_amount = total_amount;
    }

    public String getIs_lock() {
        return is_lock;
    }

    public void setIs_lock(String is_lock) {
        this.is_lock = is_lock;
    }

    public String getIs_shop() {
        return is_shop;
    }

    public void setIs_shop(String is_shop) {
        this.is_shop = is_shop;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }
}
